package main

import (
	"fmt"
)

func main() {
	switch "hello" {
	default:
		fmt.Printf("default\n")
	case "world":
		fmt.Printf("world\n")
	case "hello", "hello1":
		fmt.Printf("hello or hello1\n")
	}

	var inter interface{}
	inter = "xxx"
	switch inter.(type) {
	default:
		fmt.Printf("default type : %T\n", inter)
	case string:
		fmt.Printf("%T : %s\n", inter, inter.(string))
	case uint32:
		fmt.Printf("%T : %d\n", inter, inter.(uint32))
	}

	var inter2 interface{}
	inter2 = "xxx"
	switch val := inter2.(type) {
	default:
		fmt.Printf("default type : %T\n", val)
	case string:
		fmt.Printf("%T : %s\n", val, val)
	case uint32:
		fmt.Printf("%T : %d\n", val, val)
	}

	var num uint32 = 100
	switch {
	default:
		fmt.Printf("other\n")
	case num < 1000:
		fmt.Printf("num < 1000\n")
	case num < 500:
		fmt.Printf("num < 500\n")
	}
}
